<template>
  <div class="content">
	<div class="flex-cc">
		<el-button class="m5" type="warning" @click="handelClick">按钮1</el-button>
		<el-button class="m5" type="warning" @click="handelClick2">按钮2</el-button>
	</div>
	<el-button class="m5" @click="toPath('/login')">跳转</el-button>
	<div class="f20">stateCount{{state.count}}</div>
	<div class="f20">publicStoreCount{{publicStore.count}}</div>
	<div class="f20">站号：{{publicStore.stationNum}}</div>
	<div class="f20">title：{{title}}</div>
	<!-- <div class="f20">sensorList：{{publicStore._public.sensorList}} </div> -->
  </div>
</template>

<script setup lang="ts">
  const { proxy }:any = getCurrentInstance()
  const configStore = proxy.configStore()
  const publicStore = proxy.publicStore()
  const title = $ref(123)
   
  const state = reactive({
	  ...publicStore.$state,
	  test1: '测试1'
  })
  const handelClick = () => {
	  state.count ++
  }
  const handelClick2 = () => {
	  publicStore.count++
	  publicStore.save({stationNum: publicStore.count})
  }

  onMounted(async() => {
	let query_sensor = {"o": "o_sensor","p": ["201"], "i":0}
	let query_voltage = {"o": "o_wf_voltage"}
	state.params = {_sensorList: query_sensor}
	let res = await publicStore.post(state.params)
  })

</script>


<style>
.content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.logo {
  height: 200px;
  width: 200px;
  margin-top: 200px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 50px;
}

.text-area {
  display: flex;
  justify-content: center;
}

.title {
  font-size: 36px;
  color: #8f8f94;
}
</style>
